***************************  General Information on AMUMSS ****************************
- NOTE: we are using LUA 5.3
	Can be used in the script:
		- All the standard lua syntax (section 3 of https://www.lua.org/manual/5.3/),
		- All available standard functions in {string, math, table}
		- Also io.open, io.input, io.type, io.read, io.lines and io.close
		- And os.clock, os.date, os.difftime, os.getenv, os.time, os.tmpname
		- Plus {assert, pairs, ipairs, print, tonumber, tostring, type}

- See 'Script_Rules.txt' for more information about AMUMSS script usage/structure

- Installation:
	* De-compress the zip file to its own folder
	* Always install in a new folder
	* You can copy/paste these folders from the previous version of AMUMSS
		if you would like to preserve previous work...
			+ 'ModScript'
			+ 'ModExtraFilesToInclude'
			+ 'Builds'
			+ 'SavedSections'
			+ 'UNPACKED_DECOMPILED_PAKs'

- How to Create a Patch for existing MOD PAKs ?
	see file 'Creating a Patch for existing MOD PAKs.txt' in AMUMSS main folder

- AMUMSS 'Order of Processing' and NMS 'Load Order':	
		* From top to bottom
		* Note: not all first characters where tested here

		+  ALT+43
		-  ALT+45  minus/dash
		.
		0.
		0
		1.
		1
		  ...
		9.
		9
		=  ALT+61
		A
		a
		  ...
		Z
		z
		_  ALT+95 underscore
		__ ALT+95 underscore x2
	
- NMS MODS order of processing:
	Do not confuse "load order" and "which mod is the winner", two different things.

	Remember: If 2 mods modify the SAME file, last mod to load THAT file wins 
	(see 'NMS Load Order' above).  

	Which means that some (or all) of the files from an earlier loaded mod are used 
	and some (or all) of the files from a later loaded mod are also used
	when they are not the same files (.MBIN, .DDS, ...).

	BUT if any are the same files, the last mod to load that or those particular file(s)
	always wins the contest for these individual files to be used by NMS.

- Things Found in AMUMSS Main Folder:
	- Generated files
		* 'REPORT.txt' shows the curated information about the latest BuildMod.bat processing
		* 'SerializedScript.lua' shows what the script looks like to the engine (see also 'OPT_SKIP_SERIALIZING.txt')
		* 'NMS_pak_list.txtPretty.lua' contains ALL file names of the paks in the NMS PCBANKS folder

		* 'log.txt' is the raw output of the cmd window during the latest BuildMod.bat processing
		* 'NMS_FOLDER.txt' contains the path to your NMS installation
			(it is usually auto-generated by AMUMSS and does not, in most cases, need to be updated)
		
	- OPTION files
		To disable any of them, just rename the file (I use 'x' in front of the name)
		
		* 'OPT_Colors_ON.txt', when present, instruct AMUMSS to use colors and cursor control in the cmd window output
			  This file is ENABLED by default
		* 'OPT_SKIP_USER_PAUSE.txt', when present, instructs AMUMSS to skip one or more pause commands
			before processing begins (to allow users to read some information).
			  This file is ENABLED by default
		* 'OPT_CustomMBINCompiler.txt', when present, instructs AMUMSS to use the current MBINCompiler located
			in MODBUILDER and to not update it to any current version.
			  This file is DISABLED by default
		* 'OPT_SKIP_SERIALIZING.txt', when present, instructs AMUMSS to skip the creation
			of the SerializedScript.lua file after the User script is loaded but before processing begins,
			thus reducing the time needed to start executing scripts.
			  This file is DISABLED by default

			However, note that the SerializedScript.lua file can be a valuable tool for the modder developping
			a complex script as it shows what the AMUMSS engine sees of their script.

	- Folders usage
		* 'ModScript' is where you put:
			   A) 'one or many' .lua scripts to create one combined or many individual mods 
			or B) 'one or many' .pak files (to unpack/decompile them to the 'UNPACKED_DECOMPILED_PAKs' folder)
			or C) one .pak plus 'one or many' .lua scripts (to create a PATCH_MOD, a special kind of combined mod)
			or D) 'one or many' .pak files and if 'one or many' of these paks have a .lua script inside, that would allow you to build a mod from it...
			
			NOTE: The order of processing can influence the resulting mod in any of the combined cases above
			  (see AMUMSS order of processing above)
			
		* 'CreatedModPAKs' is where you will find the latest created pak(s)
		* 'Builds' is where copies of all your past and present created paks reside
			sub-folder 'IncrementalBuilds' contains up to 10 copies of your created paks versions
		* 'ModScriptCollection' contains a collection of .lua scripts that can generally be used to learn AMUMSS syntax (or used in NMS)
		* 'ModExtraFilesToInclude' where you, the modder, can put ANY extra files, of any type, to be INCLUDED in the created PAK
			The additional files will be put into the pak as is.  Exactly with their folders and files, 
			compiled if .exml and packed with the normal mbin files into the final pak
		* 'EXML_Helper' containing copies of the original and modified files so modders can view and compare the EXML files during script development
		* 'MapFileTrees' contains MapFileTree files automaticaly created which can GREATLY help a modder find the right 
			SPECIAL_KEY_WORDS (UNIQUE or not) and PRECEDING_KEY_WORDS as well as understand the structure of an original EXML
		* 'UNPACKED_DECOMPILED_PAKs' is where unpacked/decompiled .pak reside in their own 'pakname' folders
			along with a 'REPORT_pakname.txt' file
		* 'SavedSections' contains SAVE_SECTION_TO files (see below) (THIS IS STILL IN DEVELOPMENT)

		* 'MODBUILDER' contains all auxiliary files needed for AMUMSS operation (please leave this folder alone)
	
- Where do MBINs come from:
	(Always following the 'Load Order'...)
	
	- When only paks are in 'ModScript':
		* each pack is unpacked/decompiled and saved in its own folder in 'UNPACKED_DECOMPILED_PAKs'
	
	- When one pak is in 'ModScript':
		* the pack is unpacked/decompiled and saved in its own folder in 'UNPACKED_DECOMPILED_PAKs'
		* If a .lua script is found in the PAK, you are asked if you want to rebuild a MOD from
		  that script...
	
	- When one or more .lua scripts are in 'ModScript':
		* If the MBIN required by the script is already in 'MODBUILDER\MOD', there is nothing more to do
		
		* ElseIf some .pak is/are present in 'Modscript':
			First look for the MBIN in all the paks and then in NMS BANKS if not found already
			
		* ElseIf no .pak are also present in 'ModScript':
			the MBIN is located and extracted from NMS BANKS
			
	- If some files are in 'ModExtraFilesToInclude', you will be asked if you want to include them
		in the final PAK (if there is a pak created, obviously).
	
	- Each MBIN is passed to MBINCompiler.exe to try decompile it...

- ADD and REMOVE operations:
	The ADD_REMOVE scripts do include both operations if you look at all the script content. 

	In ADD_REMOVE_FORLOOP_usage-Recipes.lua, you can see the REMOVE parts AFTER the end 
		of the NMS_MOD_DEFINITION_CONTAINER (by exception) because the script programmatically 
		injects the REMOVE section in the EXML_CHANGE_TABLE.  (A bit more involved in lua stuff)

	In ADD_REMOVE_TEXT_EXAMPLE.lua, the REMOVE section is the next to last one of the EXML_CHANGE_TABLE.

	Replacing in place does not involve ADD / REMOVE if you are just changing values.

	That said, if you want to replace, it is usually a two step affair:
		Easiest way is to target the section you want to replace 
		and first ADD your new section after it.  
		Then re-target the same section and REMOVE it. 
		You are then left with only the ADDed section.

- Conflicting LUA script are ok 
	if they don't change the same exact value, as long as you process them at the same time.

	This is how it works:
		1st script that use a new MBIN file will fetch that from PCBANKS or a pak in ModScript.
		2nd script that modifies the same MBIN doesn't need to fetch it again
			and uses the one already invoked by the 1st script and so on...

	It is like if you had only one script making the different changes.
	
	Of course, if you change the same value 2 times, only the last change exist in the exml file that
	will be use to create the pak.
